//@ sourceURL=ReceiveRecordView.js
Ext.ns("ReceiveRecordView");
ReceiveRecordView=new Ext.extend(Ext.Panel,{
constructor : function(a){
	Ext.applyIf(this,a);
	var all=this.initUIComponents();
	ReceiveRecordView.superclass.constructor.call(this,{
		id :"ReceiveRecordView",
		title : "领用记录管理",
		region : "centre",
		layout : "border",
		border : false,
		iconCls : "menu-position",
		items : [all.yearGridPanel,all.yearGridSearchPanel,all.yearGridTreePanel]
	});
},
	initUIComponents : function(){
		var yearGridComponents=new createyeargridview({
			  topbar : {
	                inputFormName : 'ReceiveRecordForm',
	                topbarAdd:{
	                    hidden:false
	                },
	                topbarDel:{
	                    hidden:false
	                }
	            },
	            search : {
	                items : [ {
	                    style : "margin:5px 5px 5px 5px;",
	                    text : "领用部门"
	                }, {
	                    columnWidth : 0.2,
	                    xtype : "textfield",
	                    name : "Q_department_S_LK",
	                    maxLength : 256
	                },{
	                	style : "margin:5px 5px 5px 5px;",
	                	text : "领用物品",
	                },{
	                	columnWidth : 0.2,
	                	xtype : "textfield",
	                	name : "Q_receiveGoods_S_LK"
	                } ]
	            },
	            grid :{
	            	title :"领用记录列表",
	            	rowActions : true,
	                listUrl : __ctxPath + "/labourproducts/listReceiveRecord.do",
	            	removeUrl : __ctxPath + "/labourproducts/deleteReceiveRecord.do",
	            	fields : ["id","years","institution","department","receiverName","user","receiveDate","amount","unit","actualAmount","receiveGoods"],
	            	  columns : [ {
	                      header : "id",
	                      dataIndex : "id",
	                      hidden : true
	                  }, {
	                      header : "年份",
	                      dataIndex : "years",
	                      width : 50,
	                      sortable : true
	                  },
	                  {
	                      header : "所属机构",
	                      dataIndex : "institution",
	                      width : 100
	                  },{
	                      header : "领用部门",
	                      dataIndex : "department",
	                      width : 100
	                  },{
	                      header : "领用人",
	                      dataIndex : "receiverName",
	                      width : 70
	                  },{
	                      header : "领用物品",
	                      dataIndex : "receiveGoods",
	                      width : 100
	                  }, 
	                  {
	                      header : "领用日期",
	                      dataIndex : "receiveDate",
	                      width : 70
	                  },{
	                  	 header : "实际发放数量",
	                       dataIndex : "actualAmount",
	                       width : 100
	                  },
	              ]
	            
	            
	            },
	            tree : {
	                treeUrl : __ctxPath + "/labourproducts/treeLoadReceiveRecord.do"
	            }
		});	
		      return yearGridComponents;
		
}	

});
